package com.neusoft.demo.mapper;

import com.neusoft.demo.pojo.Cart;
import org.apache.ibatis.annotations.*;

@Mapper
public interface CartMapper {
    @Select("select * from cart")
    public java.util.List<Cart> cartList();
    @Insert("insert into cart(foodId,businessId,userId,quantity) values(#{foodId},#{businessId},#{userId},#{quantity})")
    public  int addCart(Cart cart);
    @Update("update cart set quantity=#{quantity} where  foodId=#{foodId}")
    public int updateCart(Cart cart);
    @Delete("delete from cart where foodId=#{foodId}")
    public  int delCart(int foodId);
    @Delete("delete from cart")
    public  int del(Cart cart);

}
